# P372-P376
class Cat:

    name = 0

    gender = 0

    def __init__(self, name, gender):
        print("这是类内部的初始化方法，相当于php的__construct方法，是自动调用的")
        self.name = name
        self.gender = gender

    def __del__(self):
        print("销毁对象的时候执行")

    def __str__(self):
        return "我是" + self.name

cat_object = Cat("汤姆", True)
print(cat_object)
